1
general::
Phrase(s): beat the rap
Sl. to evade conviction and punishment (for a crime). • He was charged with drunk driving, but he beat the rap. • The police hauled Tom in and charged him with a crime. His lawyer helped him beat the rap.
McGrawhill's American Idioms And Phrasal Verbs
2
general::
Escape punishment; win acquittal. For example, The youngsters were caught shoplifting, but somehow they were able to beat the rap. The rap in this idiom means "the legal charge against one." [Slang; 1920s]
American Heritage Idioms